#include<stdio.h>

void print(int num);

int main()
{
	int num = 0;
	scanf("%d",&num);
	print(num);
	
	return 0;
}

void print(int num)
{
	printf("%d ",num % 10);
	num /= 10;
	if(num <= 0){
		return ;
	}
	return print(num);
}


